# ======================================================================================
# File         : vim.snippets
# Author       : Wu Jie 
# Last Change  : 06/16/2009 | 15:38:10 PM | Tuesday,June
# Description  : 
# ======================================================================================

# ------------------------------------------------------------------ 
# Desc: guard
# ------------------------------------------------------------------ 

snippet guard
	if exists('${1:loaded_`Filename()`}') || &cp${2: || version < 700}
		finish
	endif
	let $1 = 1

# ------------------------------------------------------------------ 
# Desc: 
# ------------------------------------------------------------------ 

snippet fn
	" ------------------------------------------------------------------ 
	" Desc: 
	" ------------------------------------------------------------------ 

	function ${1:function_name} (${2}) " <<<
		${3:" TODO: code}
	endfunction " >>>

# ------------------------------------------------------------------ 
# Desc: 
# ------------------------------------------------------------------ 

snippet for
	for ${1:item} in ${2:list_name}
		${3:" TODO: code}
	endfor

# ------------------------------------------------------------------ 
# Desc: 
# ------------------------------------------------------------------ 

snippet wh
	while ${1:condition}
		${2:" TODO: code}
	endwhile

# ------------------------------------------------------------------ 
# Desc: 
# ------------------------------------------------------------------ 

snippet ife
	if ${1:condition}
		${2: " TODO: code}
	else
		${3: " TODO: code}
	endif
snippet if
	if ${1:condition}
		${2:" TODO: code}
	endif
snippet elif
	elseif ${1:condition}
		${2: " TODO: code}
snippet el
	else
		${1: " TODO: code}
